// MPC4 output feedback of porosity
#ifndef MPC4_H
#define MPC4_H

#include "MPC_Base.h"

class MPC4: public MPC_Base
{
private:
	int		L;				// Lattice size, site
	double	int_w;			// integrated W, layers

	ofstream db_MPC4;
	void	lowerlimit1(); 
	void	lowerlimit2();
public:
	MPC4(   double	iDens_set,
			double	iFact_D, 
			double	iRough2_set,
			double	iFact_R2, 
			double	iHt_set,	
			double	iFact_H, 
			double	it_end,
			double	iDepRate_ini = 0.1,
			double	iRT_Dep = 0.1,
			double	it_int_ctrl=1.0, 
			int		iStep_num=10,
			int		iRel_err=1,
			char*	iFileName = "MPC4.dat",
			int		iDetail = 0,
			int		iLatticeSize = 100,
			int		iControllerTypeID = 1);
	virtual double	update(	struct lattice_state iLState,
					const double P,
					const double T);
	virtual void    reset();
};
#endif